package com.saunter.utils.response;

import java.util.Map;

public abstract class Response {
    protected String code;
    public static Map<String, Object> success(Object data) {
        return new SuccessResponse(data).toResponse();
    }
    public static Map<String, Object> error(String error_code, String error_msg) {
        return error(error_code, error_msg, null);
    }
    public static Map<String, Object> error(String error_code, String error_msg, Object data) {
        return new ErrorResponse(error_code, error_msg, data).toResponse();
    }
}
